package org.zachary.commonmodule.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.Instant;

@AllArgsConstructor
@Data
@NoArgsConstructor
public class MqTransmissionJson implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    private String uuid;    //MQ识别的唯一ID
    private Integer userId; //用户ID
    private Integer serviceType;    //服务类型
    @JsonProperty("overdue")
    private boolean isOverdue;  //是否逾期 0 守约 1 逾期
    private Integer overduePeriod;  //第几逾期期
    @JsonProperty("paid")
    private boolean isPaid; //是否为付费服务：0不付费 1 付费
    private double amount; //金额
    private String desc;
    @JsonDeserialize(using = UnixTimestampDeserializer.class)
    private Instant dueTime;

    @JsonDeserialize(using = UnixTimestampDeserializer.class)
    private Instant finishTime;
    public boolean getIsOverdue() {
        return isOverdue;
    }
    public boolean getIsPaid() {
        return isPaid;
    }
}